package com.premadefood.service;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.premadefood.domain.Goods;
import com.baomidou.mybatisplus.extension.service.IService;
import com.premadefood.domain.dto.GoodsDTO;
import com.premadefood.domain.vo.GoodsVO;

import javax.servlet.http.HttpServletRequest;
import java.util.List;

/**
* @author 23854
* @description 针对表【goods】的数据库操作Service
* @createDate 2024-02-27 16:10:49
*/
public interface GoodsService extends IService<Goods> {

    List<GoodsVO> searchGoods(String searchContext);

    GoodsDTO showDetail(Integer goodsId,HttpServletRequest request);

    Boolean focusGoods(Integer goodsId,HttpServletRequest request);

    Boolean focusStore(String storeName,HttpServletRequest request);

    List<GoodsVO> showTimeNew(long pageNum);

    List<GoodsVO> showSecondSale(long pageNum);

    /**
     * 需要分页的转换GoodsVO
     * @param pageNum
     * @param queryWrapper
     * @return
     */
    public List<GoodsVO> getGoodsVOS(long pageNum, QueryWrapper<Goods> queryWrapper);

    /**
     * 无需分页的转换GoodsVO
     * @param queryWrapper
     * @return
     */
    public List<GoodsVO> getGoodsVOS(QueryWrapper<Goods> queryWrapper);
}
